<style>
<!--
div.upload_form {
	padding: 30px 40px; 
}

div.upload_form .img_wrap {
	width: 100px;
	height: 100px;
	border: 1px solid;
	left: 100px;
	position: relative;
}
-->
</style>
<div class="upload_form">
<div class="img_wrap" style="display:none">
	<?php if (isset ( $_GET ['pid'] )) : ?>
	<img src="<?php echo $this->createUrl ( '/picture/thumbnail', array ('pid' => $_GET ['pid'], 'width' => 100, 'height' => 100 ) ); 	?>" />
	<?php endif;?>
</div>
<br/>
<?php 
$form=$this->beginWidget('CActiveForm', array(
	'id'=>'upload-form',
	'action'=>array('/picture/upload'), 
	'htmlOptions'=>array('enctype'=>'multipart/form-data')
	
)); 

echo $form->hiddenField($model,'type');


?>
	
	<div class="row"> 
		<?php echo $form->error($model,'file'); ?>
		<?php echo $form->fileField($model,'file',array('class'=>'input')); ?>
	</div>
	<div class="row buttons">
		<?php echo CHtml::submitButton('上传',array('class'=>'button')); ?>
		
	</div>
<?php $this->endWidget(); ?>
</div>